package day06;

import javax.servlet.ServletContext;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/testServletContext")
public class TestServletContextServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("TestServletContextServlet.service()");

        ServletContext application=getServletContext();
        // ServletContext application=request.getServletContext();
        // ServletContext application=request.getSession().getServletContext();

        // application.setAttribute("","");
        // application.getAttribute("");
        // application.removeAttribute("");

        String aaa=application.getInitParameter("aaa");

        System.out.println("aaa = " + aaa);

        System.out.println(application.getRealPath("js/jquery-3.3.1.min.js"));



    }
}
